<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN"> 
<head>
	<!-- INCLUDE meta.html -->
</head>
<body>
<div class='maindiv'>

<div class="headerdiv">
	<!-- INCLUDE header.html -->
</div>

<div id='content' style="margin:0px;padding:0px;">
	<div id='left'>
    	<div style="margin:10px;margin-top:30px;">
        	<ul>
            	<li><a href="javascript:new_category()">{NEW_CATEGORY}</a></li>
            </ul>
    		
        </div>
    </div>
    <div id='maindiv'>
    	<div class="description">
			{page_description}
        </div>

        <!-- IF err_msg -->
        <div class="err_msg pad">
        	{err_msg}
        </div>
        <!-- ENDIF -->
        
        <!-- IF success_msg -->
        <div class="success_msg pad">
        	{success_msg}
        </div>
        <!-- ENDIF -->
        
        <div class="real_content">
        	
        	<div id="new_category" style="display:<!-- IF category --><!-- ELSE -->none<!-- ENDIF -->;margin:20px;background-color:#FFFF99;width:400px;">
            	<h2>{NEW_CATEGORY}</h2>
        		<!-- INCLUDE category_new.html -->
            </div>
            <!-- INCLUDE category_list.html -->
        </div>
        
    </div>
</div>

<script>
function delete_category(id,o)
{
	$(o).attr('to_be_delete','yes').html('{DELETING}').unbind('click');
	$.post('admin.php?p=ajax&m=delete&table=category&id='+id,{ },delete_callback);
}
function delete_callback(s)
{
	if (s == 'error')
	{
		alert('{DELETE_ERROR}');
		return false;
	}
	$('[to_be_delete=yes]').parent().parent().fadeOut();
}
function new_category()
{
	$('#new_category').fadeTo(10,0).slideDown(200).fadeTo('fast',1);
}
function cancel_new_category()
{
	$('#new_category').fadeTo('fast',0).slideUp(200);
}

</script>
<!-- INCLUDE footer.html -->

</div>
</body>
</html>